package com.gyh.stlserver.service.impl;

import com.gyh.stlserver.mapper.ChartsMapper;
import com.gyh.stlserver.service.ChartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ChartsServiceImpl implements ChartsService {
    @Autowired
    private ChartsMapper chartsMapper;
    @Override
    public List<Map<String, Object>> getHotCourse(String date) {
        return chartsMapper.selectCourseOrderByReserve(date);
    }

    @Override
    public List<Map<String, Object>> getWeekMember(String date) {
        return chartsMapper.selectMemberCount(date);
    }

    @Override
    public Integer getMemberTotal() {
        return chartsMapper.selectMemberTotal();
    }

    @Override
    public Integer getCoachTotal() {
        return chartsMapper.selectCoachTotal();
    }

    @Override
    public Integer getCourseTotal() {
        return chartsMapper.selectCourseTotal();
    }

    @Override
    public Integer getReserveTotal() {
        return chartsMapper.selectReserveTotal();
    }

    @Override
    public List<Map<String, Object>> getWeekCourse(String date) {
        return chartsMapper.selectCourseCount(date);
    }

    @Override
    public List<Map<String, Object>> getWeekCoach(String date) {
        return chartsMapper.selectWeekCoach(date);
    }

    @Override
    public List<Map<String, Object>> getWeekReserve(String date) {
        return chartsMapper.selectWeekReserve(date);
    }

    @Override
    public List<Map<String, Object>> getReserveCount(String date) {
        return chartsMapper.selectReserveCount(date);
    }

    @Override
    public List<Map<String, Object>> getHotCoach(String date) {
        return chartsMapper.selectCoachOrderByReserve(date);
    }
}
